package com.jic.market.mapper;

import java.lang.Long;
import java.util.List;

import com.jic.market.entity.LotteryDrawRecord;
import com.jic.market.request.manager.lottery.LotteryDrawRecordRequest;
import com.jic.market.request.rest.lottery.LotteryActivityInfoRestRequest;
import com.jic.market.request.rest.lottery.WinningRecordsRestRequest;
import com.jic.market.response.manager.lottery.LotteryDrawRecordResponse;
import com.jic.market.response.rest.lottery.LotteryWinningRecordsResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * 抽奖记录表
 * @author : 
 * @email : 
 * @since : 2020-03-03 03:06:20
 * @version : v1.0.0
 */
@Repository
@Mapper
public interface  LotteryDrawRecordMapper {

    long insert(LotteryDrawRecord lotteryDrawRecord);

    long delete(Long id);

    long update(LotteryDrawRecord lotteryDrawRecord);

    LotteryDrawRecord queryByPrimaryKey(Long id);

    List<LotteryDrawRecord> query(LotteryDrawRecord lotteryDrawRecord);

    List<LotteryDrawRecordResponse> queryPage(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("lotteryDrawRecordRequest") LotteryDrawRecordRequest lotteryDrawRecordRequest);

    long queryPageCount(@Param("lotteryDrawRecordRequest") LotteryDrawRecordRequest lotteryDrawRecordRequest);

    /**
     * 我的奖品 H5
     * @param startIndex
     * @param limit
     * @param request
     * @return
     */
    List<LotteryWinningRecordsResponse> getUserWinningRecord(@Param("startIndex") int startIndex, @Param("limit") int limit, @Param("winningRecordsRequest") LotteryDrawRecordRequest request);

    /**
     * 我的奖品 H5
     * @param request
     * @return
     */
    long getUserWinningRecordCount(@Param("winningRecordsRequest") LotteryDrawRecordRequest request);
}